package my.rpc.common.bean;

/**
 * 封装 RPC 响应
 * @author fengbo
 * @date 2017/11/2
 */
public class RpcResponse {

    private Exception exception;
    private Object result;

    public boolean hasException() {
        return exception != null;
    }

    public Throwable getException() {
        return exception;
    }

    public void setException(Exception exception) {
        this.exception = exception;
    }

    public Object getResult() {
        return result;
    }

    public void setResult(Object result) {
        this.result = result;
    }
}
